package com.woniu.new_orange.finance_model_guo.controller;

import com.woniu.new_orange.entity.CompanyAccountFund;
import com.woniu.new_orange.entity.CompanyStream;
import com.woniu.new_orange.entity.PushLevel;
import com.woniu.new_orange.entity.Recommend;
import com.woniu.new_orange.finance_model_guo.Vo.CompanyAccountEcharts;
import com.woniu.new_orange.finance_model_guo.Vo.CompanyAccountEcharts1;
import com.woniu.new_orange.finance_model_guo.Vo.CompanyAccountEcharts2;
import com.woniu.new_orange.finance_model_guo.Vo.CompanyAccountVo;
import com.woniu.new_orange.finance_model_guo.service.CompanyAccountFunds;
import com.woniu.new_orange.finance_model_guo.service.CompanyStreamService;
import com.woniu.new_orange.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * @Program: new_orange->CompanyAccountFundsController
 * @Description: 公司信息账户表controller
 * @Author: donghang
 * @Date: 2023-01-14 09:56
 * @Version： 1.0
 **/
@RestController
@RequestMapping("company")
@Api(tags = "公司账户表")
public class CompanyAccountFundsController {
    @Resource
    private CompanyAccountFunds companyAccountFunds;
    @Resource
    private CompanyStreamService companyStreamService;
    @ApiOperation(value = "查全部",notes = "进行查询全部")
    @GetMapping("quereyAll")
    public Result query(){
        List<CompanyAccountVo> companyAccountFunds = this.companyAccountFunds.selectAll();
        return Result.ok().data("companyAccountFundsList",companyAccountFunds);
    }
    @PostMapping("")
    public Result add(@RequestBody CompanyAccountFund companyAccountFunds1){
        int i = companyAccountFunds.insertSelective(companyAccountFunds1);

        return  Result.ok();
    }
    @GetMapping("quereyEcharts")
    public Result quereyEcharts(){
        List<CompanyAccountVo> companyAccountVos = companyAccountFunds.quereyEcharts();
        return Result.ok().data("AccountEchartsList",companyAccountVos);
    }
    @GetMapping("quereyEcharts1")
    public Result quereyEcharts1(){
        List<CompanyAccountEcharts> companyAccountEcharts = companyAccountFunds.quereyEcharts1();
        return Result.ok().data("AccountEchartsList",companyAccountEcharts);
    }
    @GetMapping("quereyEcharts2")
    public Result quereyEcharts2(){
        List<CompanyAccountEcharts1> companyAccountVos1 = companyAccountFunds.quereyEcharts2();
        return Result.ok().data("AccountEchartsList2",companyAccountVos1);
    }
    @GetMapping("quereyEcharts3")
    public Result quereyEcharts3(){
        List<CompanyAccountEcharts1> companyAccountEcharts1s = companyAccountFunds.quereyEcharts3();
        return Result.ok().data("AccountEchartsList3",companyAccountEcharts1s);
    }

}
